//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.rightin.reader.hf.myhf;

import com.rightin.reader.hf.CRC16Util;
import com.rightin.reader.hf.CommunicatorStruct;
import com.rightin.reader.hf.Crc16New;
import com.rightin.reader.hf.HfTagInfo;
import com.rightin.reader.hf.ToUnsigned;
import com.rightin.reader.hf.model.CommandSetResult;
import com.rightin.reader.hf.model.GetTagInfoResult;
import com.rightin.reader.hf.model.ReadBlocksResult;
import com.rightin.reader.hf.model.SystemInfoResult;
import com.rightin.reader.hf.myhf.HfBaseSocket.OnBaseSocketListener;
import com.rightin.reader.hf.rfidenum.EnumModuleState;
import com.rightin.reader.hf.rfidenum.EnumReaderStatus;
import com.rightin.reader.hf.rfidenum.EnumResults;
import com.rightin.reader.hf.rfidenum.EnumRfidCommand;
import com.rightin.reader.hf.rfidenum.EnumSecStatus;
import com.rightin.reader.hf.rfidenum.EnumTagType;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;

public class HfConnector implements OnBaseSocketListener {
    private final byte[] DEFAULT_HEAD = new byte[]{-35, 17, -17};
    private static final int MAX_BUFFER = 100;
    private Object _tag;
    private ArrayList<Byte> responseList = new ArrayList();
    private byte eof = -17;
    private byte reader_address;
    private HfBaseSocket reader = new HfBaseSocket();
    protected OutputStream mOutputStream;
    protected InputStream mInputStream;
    private String error;
    private int ilen;
    public boolean _is_inventory = false;
    public boolean _is_inventory_block = false;
    private boolean auto_read = false;
    private List<HfTagInfo> hfTagInfos = new ArrayList();
    private com.rightin.reader.hf.myhf.HfReader.OnHfReaderListener hfReaderListener = null;

    public boolean is_is_inventory() {
        return this._is_inventory;
    }

    public Object getTag() {
        return this._tag;
    }

    public void setTag(Object value) {
        this._tag = value;
    }

    public byte getReaderAddress() {
        return this.reader_address;
    }

    public void setReaderAddress(byte value) {
        this.reader_address = value;
        HfCommon._reader_address = value;
    }

    public String getError() {
        return this.error;
    }

    public void setError(String value) {
        this.error = value;
    }

    public HfBaseSocket getMyBaseSocket() {
        return this.reader;
    }

    public final byte getEOF() {
        return this.eof;
    }

    public final void setEOF(byte value) {
        this.eof = value;
    }

    public void setOnHfReaderListener(com.rightin.reader.hf.myhf.HfReader.OnHfReaderListener _hfReaderListener) {
        this.hfReaderListener = _hfReaderListener;
    }

    private byte[] readBytes() {
        try {
            Thread.sleep(200L);
            byte[] buffer = this.reader.readBytes();
            if (buffer == null) {
                return null;
            } else {
                int icount = buffer.length;
                if (icount >= 4 && buffer[0] == -35 && buffer[1] == 17 && buffer[2] == -17) {
                    int size = buffer[3];
                    buffer = new byte[size - 4];
                    buffer = this.reader.readBytes();
                    byte[] revbytes = new byte[size];
                    revbytes[0] = -35;
                    revbytes[1] = 17;
                    revbytes[2] = -17;
                    revbytes[3] = (byte)size;

                    for(int i = 4; i < size; ++i) {
                        revbytes[i] = buffer[i - 4];
                    }

                    this.hfReaderListener.onDataReceivedHandler(this._tag, revbytes);
                    return revbytes;
                } else {
                    return null;
                }
            }
        } catch (InterruptedException var6) {
            var6.printStackTrace();
            return null;
        }
    }

    private void resolveProtocol(byte[] buffer) {
        this.hfReaderListener.onDataReceivedHandler(this._tag, buffer);
        Crc16New.cal_crc16(buffer, buffer.length - 2);
        EnumRfidCommand cmd = EnumRfidCommand.forValue(buffer[5]);
        switch(cmd) {
            case GetSystemInfo:
                this.systemInfoResolve(buffer);
                break;
            case Inventory:
                this.inventoryUIDResolve(buffer);
                break;
            case ReadSingleBlocks:
                this.readSingleBlocksResolve(buffer);
                break;
            case ReadMultipleBlocks:
                this.readMultipleBlocksResolve(buffer);
                break;
            case GetTagSystem:
                this.getTagInfoResolve(buffer);
                break;
            case GetMulBlocksSecurity:
                this.getMulipleBlocksSecStatusResolve(buffer);
                break;
            case InventoryMultipleBlocks:
                this.inventoryMultipleBlocksResolve(buffer);
                break;
            default:
                this.commandSetResolve(buffer);
        }

    }

    private void systemInfoResolve(byte[] buffer) {
        CommunicatorStruct structs = HfCommon.getCommunicatorStruct(buffer);
        EnumResults result = EnumResults.OK;
        String createDate = HfCommon.toHexString2Format(new byte[]{buffer[9], buffer[10], buffer[11]}, "");
        int channels = buffer[12];
        String normalPower = HfCommon.convertHalfInt(buffer[13]);
        String hardwareVer = HfCommon.convertHalfInt(buffer[14]);
        String firmwareVer = HfCommon.convertHalfInt(buffer[15]);
        String sn = HfCommon.toHexString2Format(new byte[]{buffer[16], buffer[17]}, "");
        this.hfReaderListener.onSystemInfoHandler(this._tag, result, createDate, channels, normalPower, hardwareVer, firmwareVer, sn, structs);
        SystemInfoResult.result = result == EnumResults.OK;
        SystemInfoResult.createDate = createDate;
        SystemInfoResult.channels = channels;
        SystemInfoResult.normalPower = normalPower;
        SystemInfoResult.hardwareVer = hardwareVer;
        SystemInfoResult.firmwareVer = firmwareVer;
        SystemInfoResult.sn = sn;
    }

    private void inventoryUIDResolve(byte[] buffer) {
        CommunicatorStruct structs = HfCommon.getCommunicatorStruct(buffer);
        EnumResults result = EnumResults.forValue(buffer[6]);
        if (result == EnumResults.SingleTag) {
            EnumTagType tagType = EnumTagType.forValue(buffer[7]);
            int dsfid = buffer[8];
            String uid = HfCommon.toHexString2Format(new byte[]{buffer[9], buffer[10], buffer[11], buffer[12], buffer[13], buffer[14], buffer[15], buffer[16]}, "");
            this.hfReaderListener.onInventoryUIDHandler(this._tag, result, tagType, dsfid, uid, 1, EnumReaderStatus.Ok, structs);
            HfTagInfo tagInfo = new HfTagInfo();
            tagInfo.setDsfid(dsfid);
            tagInfo.setTagType(tagType);
            tagInfo.setUid(uid);
            this.hfTagInfos.add(tagInfo);
        } else {
            int tagCount = Integer.parseInt(HfCommon.toHexString2Format(new byte[]{buffer[7], buffer[8]}, ""), 16);
            EnumReaderStatus status = EnumReaderStatus.forValue(buffer[9]);
            this.hfReaderListener.onInventoryUIDHandler(this._tag, result, EnumTagType.HF, 0, "", tagCount, status, structs);
            if (this._is_inventory) {
                this.inventory(this.reader_address);
            }
        }

    }

    private void commandSetResolve(byte[] buffer) {
        CommunicatorStruct structs = HfCommon.getCommunicatorStruct(buffer);
        EnumRfidCommand cmd = EnumRfidCommand.forValue(buffer[5]);
        EnumResults result = EnumResults.forValue(buffer[6]);
        int order = buffer[7];
        this.hfReaderListener.onCommandSetHandler(this._tag, cmd, result, order, structs);
        CommandSetResult.result = result == EnumResults.OK;
    }

    private void readSingleBlocksResolve(byte[] buffer) {
        CommunicatorStruct structs = HfCommon.getCommunicatorStruct(buffer);
        EnumResults result;
        if (buffer[6] == 149) {
            result = EnumResults.Error;
            this.hfReaderListener.onReadSingleBlocksHandler(this._tag, result, EnumSecStatus.Unlocked, "", structs);
        } else if (buffer[6] == 147) {
            result = EnumResults.TagDataOver;
            this.hfReaderListener.onReadSingleBlocksHandler(this._tag, result, EnumSecStatus.Unlocked, "", structs);
        } else {
            result = EnumResults.OK;
            EnumSecStatus secStatus = EnumSecStatus.forValue(buffer[7]);
            String data = HfCommon.toHexString2Format(new byte[]{buffer[8], buffer[9], buffer[10], buffer[11]}, "");
            this.hfReaderListener.onReadSingleBlocksHandler(this._tag, result, secStatus, data, structs);
        }

    }

    private void readMultipleBlocksResolve(byte[] buffer) {
        CommunicatorStruct structs = HfCommon.getCommunicatorStruct(buffer);
        EnumResults result = EnumResults.OK;
        ArrayList<EnumSecStatus> secStatusList = new ArrayList();
        ArrayList<String> dataList = new ArrayList();
        if (buffer[6] == 149) {
            result = EnumResults.Error;
            this.hfReaderListener.onReadMultipleBlocksHandler(this._tag, result, 0, (ArrayList)null, (ArrayList)null, structs);
        } else {
            int blocks = buffer[6];
            int ii = 0;

            for(int i = 0; i < blocks; ++i) {
                EnumSecStatus secStatus = EnumSecStatus.forValue(buffer[8 + ii]);
                secStatusList.add(secStatus);
                String data = HfCommon.toHexString2Format(new byte[]{buffer[9 + ii], buffer[10 + ii], buffer[11 + ii], buffer[12 + ii]}, "");
                dataList.add(data);
                ii += 5;
            }

            this.hfReaderListener.onReadMultipleBlocksHandler(this._tag, result, blocks, secStatusList, dataList, structs);
            ReadBlocksResult.secStatusList = secStatusList;
            ReadBlocksResult.dataList = dataList;
        }

        ReadBlocksResult.result = result == EnumResults.OK;
    }

    private void getTagInfoResolve(byte[] buffer) {
        CommunicatorStruct structs = HfCommon.getCommunicatorStruct(buffer);
        EnumResults result = EnumResults.OK;
        int dsfid = buffer[6];
        String uid = HfCommon.toHexString2Format(new byte[]{buffer[7], buffer[8], buffer[9], buffer[10], buffer[11], buffer[12], buffer[13], buffer[14]}, "");
        int afi = buffer[15];
        int mem_size = Integer.parseInt(HfCommon.toHexString2Format(new byte[]{buffer[16], buffer[17]}, ""), 16);
        String chip_ver = String.format("%02X", buffer[18]);
        this.hfReaderListener.onGetTagInfoHanler(this._tag, result, dsfid, uid, afi, mem_size, chip_ver, structs);
        GetTagInfoResult.result = result == EnumResults.OK;
        GetTagInfoResult.uid = uid;
        GetTagInfoResult.dsfid = dsfid;
        GetTagInfoResult.afi = afi;
        GetTagInfoResult.mem_size = mem_size;
        GetTagInfoResult.chip_ver = chip_ver;
    }

    private void getMulipleBlocksSecStatusResolve(byte[] buffer) {
        CommunicatorStruct structs = HfCommon.getCommunicatorStruct(buffer);
        ArrayList<EnumSecStatus> secStatusList = new ArrayList();
        EnumResults result;
        if (buffer[6] == 149) {
            result = EnumResults.Error;
            this.hfReaderListener.onGetMulipleBlocksSecStatusHandler(this._tag, result, 0, (ArrayList)null, structs);
        } else {
            result = EnumResults.OK;
            int blocks = buffer[6];

            for(int i = 0; i < blocks; ++i) {
                EnumSecStatus secStatus = EnumSecStatus.forValue(buffer[7 + i]);
                secStatusList.add(secStatus);
            }

            this.hfReaderListener.onGetMulipleBlocksSecStatusHandler(this._tag, result, blocks, secStatusList, structs);
            ReadBlocksResult.secStatusList = secStatusList;
        }

        ReadBlocksResult.result = result == EnumResults.OK;
    }

    private void inventoryMultipleBlocksResolve(byte[] buffer) {
        CommunicatorStruct structs = HfCommon.getCommunicatorStruct(buffer);
        EnumResults result = EnumResults.forValue(buffer[6]);
        ArrayList<EnumSecStatus> secStatusList = new ArrayList();
        ArrayList<String> dataList = new ArrayList();
        if (result == EnumResults.SingleTag) {
            EnumTagType tagType = EnumTagType.forValue(buffer[7]);
            int dsfid = buffer[8];
            String uid = HfCommon.toHexString2Format(new byte[]{buffer[9], buffer[10], buffer[11], buffer[12], buffer[13], buffer[14], buffer[15], buffer[16]}, "");
            int blocks = buffer[17];
            int i = 0;

            for(int j = 0; j < blocks; ++j) {
                EnumSecStatus secStatus = EnumSecStatus.forValue(buffer[19 + i]);
                secStatusList.add(secStatus);
                String data = HfCommon.toHexString2Format(new byte[]{buffer[20 + i], buffer[21 + i], buffer[22 + i], buffer[23 + i]}, "");
                dataList.add(data);
                i += 5;
            }

            this.hfReaderListener.onInventoryMultipleBlocksHandler(this._tag, result, tagType, dsfid, uid, blocks, secStatusList, dataList, 1, EnumReaderStatus.Ok, structs);
        } else {
            int tagCount = Integer.parseInt(HfCommon.toHexString2Format(new byte[]{buffer[7], buffer[8]}, ""), 16);
            EnumReaderStatus status = EnumReaderStatus.forValue(buffer[9]);
            this.hfReaderListener.onInventoryMultipleBlocksHandler(this._tag, result, EnumTagType.HF, 0, "", 0, (ArrayList)null, (ArrayList)null, tagCount, status, structs);
        }

    }

    private void sendCmd(byte[] sendbytes) {
        this.reader.writeBytes(sendbytes);
        this.hfReaderListener.onDataSendedHandler(this._tag, sendbytes);
    }

    public HfConnector() {
    }

    public void open(String ip, int port) {
        this.reader.open(ip, port);
        this.reader.setOnBaseSocketListener(this);
    }

    public void updateReadState(EnumModuleState state) {
        this.reader.updateReadState(state);
    }

    public void close() {
        this.reader.close();
    }

    public void commSend(byte[] request) {
        int size = 7 + request.length;
        byte[] sendbytes = new byte[size];
        sendbytes[0] = this.DEFAULT_HEAD[0];
        sendbytes[1] = this.DEFAULT_HEAD[1];
        sendbytes[2] = this.DEFAULT_HEAD[2];
        sendbytes[3] = (byte)sendbytes.length;
        sendbytes[4] = this.reader_address;

        for(int i = 0; i < request.length; ++i) {
            sendbytes[5 + i] = request[i];
        }

        byte[] bytes = new byte[size - 2];

        for(int j = 0; j < size - 2; ++j) {
            bytes[j] = sendbytes[j];
        }

        byte[] _bb = CRC16Util.makeCrc16(bytes);
        sendbytes[size - 2] = _bb[0];
        sendbytes[size - 1] = _bb[1];
        this.hfReaderListener.onDataSendedHandler(this._tag, sendbytes);
        this.sendCmd(sendbytes);
    }

    public boolean getSystemInfo() {
        byte[] sendbytes = HfCommon.getSystemInfo();
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.systemInfoResolve(revBytes);
            return SystemInfoResult.result;
        }
    }

    public void inventory(byte ant) {
        this.reader_address = ant;
        HfCommon._reader_address = ant;
        this.hfTagInfos.clear();
        byte[] sendbytes = HfCommon.inventory();
        this.sendCmd(sendbytes);
    }

    public void startInventory() {
        this._is_inventory = true;
        this._is_inventory_block = false;
        this.inventory(this.reader_address);
    }

    public void stopInventory() {
        this._is_inventory = false;
        this._is_inventory_block = false;
    }

    public boolean stayQuiet(String uid) {
        byte[] sendbytes = HfCommon.stayQuiet(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean lockBlocks(String uid, int block_id, int blocks) {
        byte[] sendbytes = HfCommon.lockBlocks(uid, block_id, blocks);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean readMultipleBlocks(String uid, int block_id, int blocks) {
        byte[] sendbytes = HfCommon.readMultipleBlocks(uid, block_id, blocks);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.readMultipleBlocksResolve(revBytes);
            return ReadBlocksResult.result;
        }
    }

    public boolean writeMultipleBlocks(String uid, int block_id, ArrayList<String> block_dataList) {
        int blocks = block_dataList.size();
        byte[] sendbytes = HfCommon.writeMultipleBlocks(uid, block_id, block_dataList);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean select(String uid) {
        byte[] sendbytes = HfCommon.select(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean resetToReady(String uid) {
        byte[] sendbytes = HfCommon.resetToReady(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean writeAFI(String uid, int afi) {
        byte[] sendbytes = HfCommon.writeAFI(uid, afi);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean lockAFI(String uid) {
        byte[] sendbytes = HfCommon.lockAFI(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean writeDSFID(String uid, int dsfid) {
        byte[] sendbytes = HfCommon.writeDSFID(uid, dsfid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean lockDSFID(String uid) {
        byte[] sendbytes = HfCommon.lockDSFID(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.getTagInfoResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean getTagSystem(String uid) {
        byte[] sendbytes = HfCommon.getTagSystem(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.getTagInfoResolve(revBytes);
            return GetTagInfoResult.result;
        }
    }

    public boolean getMulBlockSecurityStatus(String uid, int block_id, int blocks) {
        byte[] sendbytes = new byte[12];
        sendbytes[0] = (byte)EnumRfidCommand.GetMulBlocksSecurity.getValue();
        sendbytes[1] = 1;
        byte[] uidbytes = HfCommon.hexString2Bytes(uid);

        for(int i = 0; i < uidbytes.length; ++i) {
            sendbytes[i + 2] = uidbytes[i];
        }

        sendbytes[10] = (byte)block_id;
        sendbytes[11] = (byte)blocks;
        this.commSend(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.getMulipleBlocksSecStatusResolve(revBytes);
            return GetTagInfoResult.result;
        }
    }

    public void inventoryMultipleBlocks(int block_id, int blocks) {
        byte[] sendbytes = new byte[]{(byte)EnumRfidCommand.InventoryMultipleBlocks.getValue(), 1, (byte)block_id, (byte)blocks};
        this.commSend(sendbytes);
    }

    public boolean setEAS(String uid) {
        byte[] sendbytes = HfCommon.setEAS(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean resetEAS(String uid, int order) {
        byte[] sendbytes = HfCommon.resetEAS(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean lockEAS(String uid, int order) {
        byte[] sendbytes = HfCommon.lockEAS(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public boolean alarmEAS(String uid) {
        byte[] sendbytes = HfCommon.alarmEAS(uid);
        this.sendCmd(sendbytes);
        byte[] revBytes = this.readBytes();
        if (revBytes == null) {
            return false;
        } else {
            this.commandSetResolve(revBytes);
            return CommandSetResult.result;
        }
    }

    public void swOn() {
        byte[] sendbytes = new byte[]{(byte)EnumRfidCommand.SWOn.getValue(), 0};
        this.commSend(sendbytes);
    }

    public void swOff() {
        byte[] sendbytes = new byte[]{(byte)EnumRfidCommand.SWOff.getValue(), 0};
        this.commSend(sendbytes);
    }

    public void onSendedHandler(Socket socket, byte[] buffer) {
        this.hfReaderListener.onDataSendedHandler(this._tag, buffer);
    }

    public void onReceivedHandler(Socket socket, byte[] buffer) {
        this.hfReaderListener.onDataBaseReceivedHandler(this._tag, buffer);

        byte[] response;
        for(this.responseList = HfCommon.addRange(buffer); this.responseList.size() > 0; this.resolveProtocol(response)) {
            int eofIndex = this.eof == 0 ? this.responseList.size() - 1 : this.responseList.indexOf(this.eof);
            if (eofIndex >= 2) {
                byte[] header = new byte[]{(Byte)this.responseList.get(eofIndex - 1), (Byte)this.responseList.get(eofIndex - 2)};
                if (header[0] == 17 && header[1] == -35 && eofIndex > 2) {
                    this.responseList = HfCommon.removeRange(this.responseList, eofIndex - 3);
                }

                if (this.responseList.size() >= 4) {
                    this.ilen = ToUnsigned.toUnsingned2((Byte)this.responseList.get(3));
                }
            } else {
                this.responseList = HfCommon.removeRange(this.responseList, eofIndex);
            }

            if (this.ilen == 0 || this.responseList.size() < this.ilen) {
                break;
            }

            int cmd = (Byte)this.responseList.get(5);
            response = new byte[this.ilen];
            response = HfCommon.copyTo(this.responseList, this.ilen - 1);
            this.responseList = HfCommon.removeRange(this.responseList, this.ilen - 1);
            if (this.responseList.size() < this.ilen) {
                this.ilen = 0;
            }
        }

    }

    public void onErrorHandler(Socket socket, int icode, String error) {
        this.hfReaderListener.onDataErrorHandler(error);
    }

    public interface OnHfReaderListener {
        void onDataSendedHandler(Object var1, byte[] var2);

        void onDataBaseReceivedHandler(Object var1, byte[] var2);

        void onDataReceivedHandler(Object var1, byte[] var2);

        void onDataErrorHandler(String var1);

        void onResponseListHandler(Object var1, ArrayList<Byte> var2);

        void onSystemInfoHandler(Object var1, EnumResults var2, String var3, int var4, String var5, String var6, String var7, String var8, CommunicatorStruct var9);

        void onInventoryUIDHandler(Object var1, EnumResults var2, EnumTagType var3, int var4, String var5, int var6, EnumReaderStatus var7, CommunicatorStruct var8);

        void onCommandSetHandler(Object var1, EnumRfidCommand var2, EnumResults var3, int var4, CommunicatorStruct var5);

        void onReadSingleBlocksHandler(Object var1, EnumResults var2, EnumSecStatus var3, String var4, CommunicatorStruct var5);

        void onReadMultipleBlocksHandler(Object var1, EnumResults var2, int var3, ArrayList<EnumSecStatus> var4, ArrayList<String> var5, CommunicatorStruct var6);

        void onGetTagInfoHanler(Object var1, EnumResults var2, int var3, String var4, int var5, int var6, String var7, CommunicatorStruct var8);

        void onGetMulipleBlocksSecStatusHandler(Object var1, EnumResults var2, int var3, ArrayList<EnumSecStatus> var4, CommunicatorStruct var5);

        void onInventoryMultipleBlocksHandler(Object var1, EnumResults var2, EnumTagType var3, int var4, String var5, int var6, ArrayList<EnumSecStatus> var7, ArrayList<String> var8, int var9, EnumReaderStatus var10, CommunicatorStruct var11);
    }
}
